package test;

import com.king.service.UserService;
import com.king.service.UserServiceImp;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest01 {
    public static void main(String[] args) {
        //只需要修改xml配置文件即可满足需求
       ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        UserService service = context.getBean("service", UserService.class);
       service.getUSer();
    }
}
